package cn.zkw.service;

import cn.zkw.vo.Article;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public interface ArticleService {
    public Integer addArticle(Article article);

    public List<Article> splitArticle(Integer cp);

    //文章修改
    Integer updateArticle(Article article);

    //后台分页查询
    List<Article> splitArticleback(Integer num);

    public Integer getArticleAllNum();

    public List<Article> preSplitArticle(Integer num);

    public Article selectArticleById(Integer article_id);

    public boolean updateView(Article article);

    public List<Article> splitArticleBySort(Map<String,Object> map);

    public Integer selectArticleAllNum_BySort(Integer sort_id);

    public List<Article> splitArticleByKeyWord(Map<String,Object> map);

    //文章关键字搜索_统计总数
    Integer selectArticleAllNum_ByKeyWord(Map<String,Object> map);

    /**
     * 根据id list删除文章
     * @param idList
     * @return
     */
    Integer deleteArticleSet(List<Integer> idList);

    /**
     * 根据标签id查询热门文章
     * @param label_id
     * @return
     */
    List<Article> selectArticleByLabelId(Integer label_id);

    /**
     * 根据文章热度查询5篇文章
     * @return
     */
    List<Article> selectArticleByView();
}
